-- GENERATED SPELL FOR [Time-Lost Shadowmage] --


function spell0_18320(pUnit, Event) --@Curse of the Dark Talon,n/a--
pUnit:FullCastSpellOnTarget(32682,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18320', 32000, 1)
end

function spell1_18320(pUnit, Event) --@Curse of the Dark Talon,n/a--
pUnit:FullCastSpellOnTarget(38149,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18320', 32000, 1)
end

function Sorts_18320(pUnit, Event)
local choix_sorts_18320 = math.random(0, 1)
if choix_sorts_18320 == 0 then
pUnit:RegisterEvent('spell0_18320', 1, 1)
end
if choix_sorts_18320 == 1 then
pUnit:RegisterEvent('spell1_18320', 1, 1)
end
end

function mob18320_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18320', math.random(1500, 3000), 1)
end

function mob18320_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18320_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18320_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18320, 1, 'mob18320_Action')
RegisterUnitEvent(18320, 2, 'mob18320_Leave')
RegisterUnitEvent(18320, 3, 'mob18320_Kill')
RegisterUnitEvent(18320, 4, 'mob18320_Die')
